﻿using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using BuildingBlocks.Extensions;

namespace BuildingBlocks;
public static class ServiceCollectionExtensions
{
    /// <summary>
    /// 注册BuildingBlocks基础必备服务
    /// 需在Program配置使用: Swagger,跨域Cors(DefaultCorsPolicy)
    /// </summary>
    public static IServiceCollection AddBuildingBlocksCore(this IServiceCollection services, IConfiguration configuration)
    {
        
        
        services.AddCustomCors(configuration);
        services.AddCustomSwagger(configuration);

        

        return services;
    }
}